Expose IPv6 and IPv4 assigned addresses as computed properties #13
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently, the
ip_assignments
has a list of the IPs that ZeroTierprovided to the member from its assignment pool. It contains a mix of
IPv4 and IPv6 addresses.
There is some scenarios where having the distiction of wheter it is an
IPv4 or IPv6 changes which resource to create. For example using DNS
records we are only allowed to create
AAAA
records in the presence ofIPv6 addresses, and
A
records to IPv4.Filtering this information on Terraform is cumbersome, using the filter
on list operations, while it is much easier to provide this information
through the provider.
This commit create two extra computed properties,
ipv6_assignments
andipv4_assignments
, which separates each address assignment as expected.The
ipv6_assignments
does not include RFC4139 nor 6PLANE addresses asthey are always computed on the
member
resource level, even if thenetwork
is configured to not use those addresses, and theirinformation is not returned by the controller API as an assigned
address either.